<template>
  <div class="container">
    <!-- 用户信息 -->
    <user-info>
      <template v-slot:vip>
        <i>VIP</i>
      </template>
      <template v-slot:desc>
        <p>{{userDesc}}</p>
      </template>
      <template v-slot:right>
        <span class="iconfont icon-shezhi" @click="onSetup"></span>
      </template>
    </user-info>

    <!-- 收藏等数据 -->
    <user-data></user-data>

    <!-- 我的订单 -->
    <my-order></my-order>

    <!-- 会员中心等 -->
    <other-view></other-view>

    <!-- tabbar -->
    <tab-bar></tab-bar>
  </div>
</template>

<script>
import UserInfo from '@/components/Mine/UserInfo.vue'
import TabBar from '@/components/Mine/TabBar.vue'

import UserData from '@/views/MyView/UserData.vue'
import MyOrder from '@/views/MyView/MyOrder.vue'
import OtherView from '@/views/MyView/Other.vue'

export default {
  name: 'MineView',
  components: {
    UserInfo,
    UserData,
    MyOrder,
    OtherView,
    TabBar
  },
  data () {
    return {
      userDesc: ''
    }
  },
  created () {
    this.userDesc = this.$store.getters.user.desc
  },
  methods: {
    // 跳转设置页面
    onSetup () {
      this.$router.push({ path: '/setup' })
    }
  }

}
</script>

<style lang="scss" scoped>
.container{
  height: 100vh;
}
</style>
